<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>CustomWebView</title>
    <meta name="author" content="Yanyuetian">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1, target-densitydpi=medium-dpi, user-scalable=no">
    <meta property="og:site_name" content="CustomWebView"/>
    <script src="file:///android_asset/zepto.js" type="text/javascript"></script>
    <style>
      .entry{
          -webkit-padding-start: 30px;
      }
      .entry li {
          line-height: 29px;
          margin-left: -10px;
      }
      .entry li div{
          margin-right: 10px;
          padding-left: 8px;
          padding-top: 8px;
          padding-bottom: 8px;
          background: #222222;
          color: white;
          word-break: break-all;
          -ms-word-wrap: break-word;
          word-wrap: break-word;
          line-height: 15px;
          font-size: 10pt;
      }
      .entry li button{
          margin-top: 5px;
          width: 60px;
          height: 35px;
          color: #111111;
      }
  </style>
</head>

<body>
<div class="blog-header">
    <h3>Java Interface 可用接口列表测试</h3>
</div>
<ul class="entry">
    <li>
        气泡提示<br/>
        代码：<br/>
        <div>
            HostApp.doShowMessage('我是气泡');
        </div>
        <button onclick="HostApp.doShowMessage('我是气泡');">测试</button>
    </li>

    <br/>
    <li>
        异步回调，传入js函数到Java方法,设定3秒后回调<br/>
        代码：<br/>
        <div>
            HostApp.delayJsCallBack(3, 'call back haha', function (msg) {
                HostApp.doShowMessage(msg);
            });
        </div>
        <button onclick="HostApp.delayJsCallBack(3, 'call back haha', function (msg) {HostApp.doShowMessage(msg);});">测试</button>
    </li>

    <br/>
    <li>
        重载方法测试-执行整型定义<br/>
        代码：<br/>
        <div>
            HostApp.doShowMessage(
            HostApp.overloadMethod(1)
            );
        </div>
        <button onclick="HostApp.doShowMessage(HostApp.overloadMethod(1));">测试</button>
    </li>

    <br/>
    <li>
        重载方法测试-执行字符串定义<br/>
        代码：<br/>
        <div>
            HostApp.doShowMessage(
            HostApp.overloadMethod('12adadad')
            );
        </div>
        <button onclick="HostApp.doShowMessage(HostApp.overloadMethod('12adadad'));">测试</button>
    </li>

    <br/>
    <li>
        从Java层返回Java对象<br/>
        代码：<br/>
        <div>
            HostApp.doShowMessage(
            HostApp.retJavaObject()[0].intField
            );
        </div>
        <button onclick="HostApp.doShowMessage(HostApp.retJavaObject()[0].intField);">测试</button>
    </li>

    <br/>
    <li>
        过大数字精度丢失测试<br/>
        代码：<br/>
        <div>
            HostApp.doShowMessage(
                HostApp.passLongType(14102300951321235) + ''
            );
        </div>
        <button onclick="HostApp.doShowMessage(HostApp.passLongType(14102300951321235) + '');">测试</button>
    </li>
    <li>
        网页中的图片保存测试:(长按保存测试)<br/>
        <div>
            <img src="images/QQ图片20160912102956.png"  width="340" height="400">
        </div>
    </li>
    <li>
        跳转到其它页面:(导航里返回的区别，如果有历史页面，则返回历史页面,如果没有则销毁页面)<br/>
        <div>
            HostApp.toOtherPage('http://www.baidu.com');
        </div>
        <button onclick="HostApp.toOtherPage('http://www.baidu.com');">测试</button>
    </li>
</ul>

</body>
</html>